﻿-- =============================================
-- Author:		<Author,XFL>
-- Create date: <Create Date,20111222>
-- Description:	<Description,用于批量更新审核数据>
-- =============================================
CREATE PROCEDURE [dbo].[proc_Wage_Update_More]
	@Id_str nvarchar(MAX)
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering ;WITH SELECT statements.
	SET NOCOUNT ON;
    -- Insert statements for procedure here
	--EXEC('Update Employee_Wage Set HRFlag=2,HRFlagDate=GetDate() Where Id in ('+@Id_str+')')

	EXEC('
		Update Employee_Wage Set 
		HRFlag=2
		,HRFlagDate=GetDate()
		,HeJiWage=(
		([BasicWage])
		+([PostWage])
		+([WorkWage])
		+([JxWage])
		+([ManQin])
		+([Allowance])
		+([FixedAllowance])
		+([QtAllowance])
		+([TiCheng])
		+([MTiCheng])
		+([YjBonus])
		+([LsBonus])
		-([ChuQinKouKuan])
		-([BxKouKuan])
		-([ChiDaoKouKuan])
		-([YJKouKuan])
		-([OtherKouKuan])
		)
		 Where Id in ('+@Id_str+')
		')


	--Update Employee_Wage Set HRFlag=2,HRFlagDate=GetDate() Where Id in (@Id_str)
END
